package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CouponUsedInfoMapper;
import com.ruoyi.system.domain.CouponUsedInfo;
import com.ruoyi.system.service.ICouponUsedInfoService;

/**
 * 优惠券使用情况Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-04
 */
@Service
public class CouponUsedInfoServiceImpl implements ICouponUsedInfoService 
{
    @Autowired
    private CouponUsedInfoMapper couponUsedInfoMapper;

    /**
     * 查询优惠券使用情况
     * 
     * @param receiveId 优惠券使用情况主键
     * @return 优惠券使用情况
     */
    @Override
    public CouponUsedInfo selectCouponUsedInfoByReceiveId(Long receiveId)
    {
        return couponUsedInfoMapper.selectCouponUsedInfoByReceiveId(receiveId);
    }

    /**
     * 查询优惠券使用情况列表
     * 
     * @param couponUsedInfo 优惠券使用情况
     * @return 优惠券使用情况
     */
    @Override
    public List<CouponUsedInfo> selectCouponUsedInfoList(CouponUsedInfo couponUsedInfo)
    {
        return couponUsedInfoMapper.selectCouponUsedInfoList(couponUsedInfo);
    }

    /**
     * 新增优惠券使用情况
     * 
     * @param couponUsedInfo 优惠券使用情况
     * @return 结果
     */
    @Override
    public int insertCouponUsedInfo(CouponUsedInfo couponUsedInfo)
    {
        return couponUsedInfoMapper.insertCouponUsedInfo(couponUsedInfo);
    }

    /**
     * 修改优惠券使用情况
     * 
     * @param couponUsedInfo 优惠券使用情况
     * @return 结果
     */
    @Override
    public int updateCouponUsedInfo(CouponUsedInfo couponUsedInfo)
    {
        return couponUsedInfoMapper.updateCouponUsedInfo(couponUsedInfo);
    }

    /**
     * 批量删除优惠券使用情况
     * 
     * @param receiveIds 需要删除的优惠券使用情况主键
     * @return 结果
     */
    @Override
    public int deleteCouponUsedInfoByReceiveIds(Long[] receiveIds)
    {
        return couponUsedInfoMapper.deleteCouponUsedInfoByReceiveIds(receiveIds);
    }

    /**
     * 删除优惠券使用情况信息
     * 
     * @param receiveId 优惠券使用情况主键
     * @return 结果
     */
    @Override
    public int deleteCouponUsedInfoByReceiveId(Long receiveId)
    {
        return couponUsedInfoMapper.deleteCouponUsedInfoByReceiveId(receiveId);
    }
}
